'use client'

import { Button } from 'antd'
import { ArrowLeftOutlined } from '@ant-design/icons'
import { useRouter } from 'next/navigation'

export default function BackButton() {
  const router = useRouter()

  const onBack = () => {
    router.back()
  }

  return (
    <Button 
      type="text" 
      icon={<ArrowLeftOutlined />} 
      onClick={onBack}
      className="flex items-center"
    />
  )
}